/*
 * InstanceList.h
 *
 *  Created on: Sep 5, 2012
 *      Author: v-suqil
 */

#ifndef INSTANCELIST_H_
#define INSTANCELIST_H_
#include <string.h>
#include <assert.h>
#include <fstream>
#include <iostream>

#include "Alphabet.h"
#include "Instance.h"

typedef std::vector<Instance*> inst_t;

class InstanceList {
private:
	Alphabet* featAlphabet;
	Alphabet* labelAphabet;
	inst_t* instances;
	char sep;
public:
	InstanceList();
	InstanceList(Alphabet* featAlpha, Alphabet* labelApha);
	virtual ~InstanceList();
	void add(char* data);
	void add(char* data, int senlen);
	void addFile(char* filename);
	void addFileToken(char* filename);
	Instance* get(int i);
	Alphabet* getFeatureAlphabet();
	Alphabet* getLabelAlphabet();
	unsigned size();
};

#endif /* INSTANCELIST_H_ */
